//
//  ECUCatalogModel.h
//  Edu_iOS
//
//  Created by apple on 2017/9/23.
//  Copyright © 2017年 yanyan. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ECUCatalogModel : NSObject

@property (nonatomic, copy) NSString *_Nullable text;//标题
@property (nonatomic, copy) NSString *_Nullable level;//添加节点层级
@property (nonatomic, copy) NSString *_Nullable time;//视频时长
@property (nonatomic, copy) NSString *_Nullable url;//视频url
@property (nonatomic, copy) NSString *_Nullable type;//type

@property (nonatomic, assign,readonly) NSInteger dataType;//视频或者其他文件类型
@property (nonatomic, assign,readonly) NSInteger isFree;//是否免费课时
@property (nonatomic, assign,readonly) NSInteger learnStatus;//学习状态类型
//...

@property (nonatomic, assign) NSInteger belowCount;//0为折叠状态 1为展开状态
@property (nonatomic, assign) NSInteger levelOneCount;//level为1的标识的数量（用于控制2级cell上竖线的显示）
@property (nonatomic, assign) NSInteger levelOneWitch;//level为1的标识的序号（用于控制2级cell上竖线的显示）

@property(nullable,nonatomic) ECUCatalogModel *supermodel;//父节点模型

@property(nonatomic,strong) NSMutableArray<__kindof ECUCatalogModel *> * _Nullable submodels;//子节点数组

+ (instancetype _Nullable )modelWithDic:(NSDictionary *_Nullable)dic;

- (NSArray *_Nullable)open;

- (void)closeWithSubmodels:(NSArray *_Nullable)submodels;

@end

/*
 "data": {
 "id":"123",
 "title": "文件上传",
 "seq": "3",
 "number": "1",
 "type": "video",
 "length": "61",
 "free": "0",
 "content": "",
 "learnStatus": null,
 "media": "http://xywout.oss-cn-hangzhou.aliyuncs.com/20171113011759-p7jrvu.m3u8"
 "status":"published"/"unpublished"
 },
 "itemType": "lesson",
 "title": "文件上传",
 "number": "1",
 "type": "video"
 */


@class ECDetailOfListModel;

@interface ECListModel:NSObject

@property (nonatomic, strong) ECDetailOfListModel * _Nullable data;

@property (nonatomic, copy) NSString *_Nullable itemType;
@property (nonatomic, copy) NSString *_Nullable title;
@property (nonatomic, copy) NSString *_Nullable number;
@property (nonatomic, copy) NSString *_Nullable type;
///用来显示是否正在学的标志(与后台返回的"learnStatus"字段无关)
@property (nonatomic, copy) NSString *_Nullable isLearning;
@property (nonatomic, assign) int level;
@end

/*
 "id":"123",
 "title": "文件上传",
 "seq": "3",
 "number": "1",
 "type": "video",
 "length": "61",
 "free": "0",
 "content": "",
 "learnStatus": null,
 "media": "http://xywout.oss-cn-hangzhou.aliyuncs.com/20171113011759-p7jrvu.m3u8"
 "status":"published"/"unpublished"
 */

@interface ECDetailOfListModel:NSObject
@property (nonatomic, copy) NSString *_Nullable ID;
@property (nonatomic, copy) NSString *_Nullable title;
@property (nonatomic, copy) NSString *_Nullable seq;
@property (nonatomic, copy) NSString *_Nullable number;
@property (nonatomic, copy) NSString *_Nullable type;
@property (nonatomic, copy) NSString *_Nullable length;
@property (nonatomic, copy) NSString *_Nullable free;
@property (nonatomic, copy) NSString *_Nullable content;
@property (nonatomic, copy) NSString *_Nullable learnStatus;
@property (nonatomic, copy) NSString *_Nullable media;
@property (nonatomic, copy) NSString *_Nullable status;

@end





